﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace PTA.NET
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main() 
        {
            DevExpress.UserSkins.OfficeSkins.Register();
            DevExpress.UserSkins.BonusSkins.Register();
            DevExpress.Skins.SkinManager.EnableFormSkins();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //SaveFileDialog saveFileDiaglog = new SaveFileDialog();
            //saveFileDiaglog.Filter = "Data files (*.config)|*.config|All files (*.*)|*.*";
            //saveFileDiaglog.FilterIndex = 0;
            //saveFileDiaglog.RestoreDirectory = true;

            //if (saveFileDiaglog.ShowDialog() == DialogResult.OK)
            //{
            //   // LuuTamLocal(CustomerItem, saveFileDiaglog.FileName);
            //}



            //OpenFileDialog openFileDialog1 = new OpenFileDialog();

            //openFileDialog1.InitialDirectory = @"c:\\Program Files\\PTA.NET\PTA.NET\BenhNhan";
            //openFileDialog1.Filter = "Data files (*.config)|*.config|All files (*.*)|*.*";
            //openFileDialog1.FilterIndex = 0;
            //openFileDialog1.RestoreDirectory = true;

            //if (openFileDialog1.ShowDialog() == DialogResult.OK)
            //{
            //    try
            //    {
            //        string file_name = openFileDialog1.FileName;

            //        AQFramework.Configurations config = new AQFramework.Configurations(file_name);
            //        Customer CustomerItem = new Customer();
            //        CustomerItem = (Customer)config.ReadSectionsObject("Customer");
                   

            //    }
            //    catch (Exception ex)
            //    {
            //        MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message);
            //    }
            //}



            try
            {

                //AQFramework.Configurations config = new AQFramework.Configurations("test.config");
                //Customer CustomerItem = new Customer();
                //CustomerItem = (Customer)config.ReadSectionsObject("Customer");
                //FrmConfirm f = new FrmConfirm();
                //f.CustomerItem = CustomerItem;
                //f.XuLy();



                


                Application.Run(new Main2());
            }
            catch (Exception e)
            {
                DevExpress.XtraEditors.XtraMessageBox.Show(e.Message);
            }
        }
    }
}
